import { Controller } from 'egg';

export default class SysSiteController extends Controller {


    async attrList() {
        const result = await this.ctx.service.sys.site.attrList();
        if (result) {
            this.ctx.success({
                data: result
            });
        }
    }


    async update() {
        const body = this.ctx.request.body;
        const result = await this.ctx.service.sys.site.update(body);
        if (!result) {
            this.ctx.failure({
                code: 10009,
                data: {}
            });
            return false;
        }
        this.ctx.success({
            data: result
        });
    }

}
